#! /bin/sh
# Investigate data with sugabor to ascertain a time-varying filter
# for sutvband
WIDTH=600
HEIGHT=450
WIDTHOFF1=0
WIDTHOFF2=640
HEIGHTOFF1=50
HEIGHTOFF2=530

# Spectrum of raw data
suspecfx <data.su |
suxmovie  \
	title="FX spectrum" \
	windowtitle="FX"\
	label1="Freq (Hz)" label2="Offset (km)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF1}+${HEIGHTOFF1} &

perc=90
suspecfx <data.su |
suxmovie  perc=$perc\
	title="FX spectrum: perc=$perc" \
	windowtitle="FX perc=$perc" \
	label1="Freq (Hz)" label2="Offset (km)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF2}+${HEIGHTOFF1} &

suxmovie <data.su perc=$perc \
	title="Data perc=$perc" \
	windowtitle="Data: perc=$perc" \
	label1="Freq (Hz)" label2="Offset (km)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF1}+${HEIGHTOFF2} &

# do trial and error to ascertain band and fmax and let sugabor tell n2
sugabor <data.su band=3 fmax=100 |
suxmovie n1=2000 n2=33 n3=97 perc=99 loop=1 \
	title="Gabor Transform of Trace %g" \
	windowtitle="Gabor Movie" \
	label1="Time (sec)" label2="Freq (Hz)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF2}+${HEIGHTOFF2} &


exit 0

perc=90   # accept value in book
tpow=3.2  # accept value in oz25.H

f=0,15,25,30
amps=0.,0.,1.,1.
sufilter <data.su f=$f amps=$amps |
sugain tpow=$tpow |
suxmovie  perc=$perc \
	title="f=$f + gain"\
	label1="Time (sec)" label2="Offset (km)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF2}+${HEIGHTOFF2} &

exit
